/**
 * Created by chris on 16/9/27.
 */

angular.module('starter', ['ionic', 'starter.config', 'starter.controllers', 'starter.service', 'ngResource'])
.config(function ($stateProvider, $urlRouterProvider) {

    $stateProvider
        .state('tab', {
            url: '/tab',
            templateUrl: 'templates/tabs.html'
        })
        .state('tab.home', {
            url: '/home',
            views: {
                'tab-home':{
                    templateUrl: 'templates/home/home.html',
                    controller: 'HomeController'
                }
            }
        })
        .state('tab.hots', {
            url: '/hots',
            views: {
                'tab-hots':{
                    templateUrl: 'templates/hots/hots.html',
                    controller: 'HotsController'
                }
            }

        })
        .state('tab.hotsDetail', {
            url: '/hotsDetail/:aid',
            views: {
                'tab-hots':{
                    templateUrl: 'templates/hots/hotsDetail.html',
                    controller: 'HotsDetailController'
                }
            }

        })
        .state('tab.article', {
            url: '/article',
            views: {
                'tab-article':{
                    templateUrl: 'templates/article/article.html',
                    controller: 'ArticleController'
                }
            }

        })
        .state('tab.mine', {
            url: '/mine',
            views: {
                'tab-mine':{
                    templateUrl: 'templates/mine/mine.html',
                    controller: 'MineController'
                }
            }
        })
    $urlRouterProvider.otherwise('/tab/home');
})